﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Shapes;

using ITSSP.Web.Models;

namespace ITSSP
{
    public partial class DeleteMessageBox : ChildWindow
    {
        public User UserToBeDeleted { get; set; }

        public DeleteMessageBox()
        {
            InitializeComponent();
            this.DialogResult = false;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void ChildWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
        	if(this.UserToBeDeleted == null) {
                this.Label1.Text = "Do you want to delete the current user?";
			} else {
                this.Label1.Text = "Do you want to delete the user \"" + this.UserToBeDeleted.FirstName + " " + this.UserToBeDeleted.LastName + "\"?";
			}
        }
    }
}

